package com.ntv.service.flashnews;

import java.util.List;

import com.ntv.domain.INews;
import com.ntv.persistent.PersistentException;
import com.ntv.persistent.flashnews.IFlashNewsDao;
import com.ntv.service.DomainException;

public class FlashNewsAppService implements IFlashNewsAppService{
	private IFlashNewsDao flashNewsDao;

	/**
	 * @param flashNewsDao
	 *            the flashNewsDao to set
	 */
	public void setFlashNewsDao(IFlashNewsDao flashNewsDao) {
		this.flashNewsDao = flashNewsDao;
	}

	public List<INews> getCurrentDayFlashNews() throws DomainException {

		try {
			return flashNewsDao.getCurrentDayFlashNews();
		} catch (PersistentException ex) {
			throw new DomainException(ex);
		}
	}
}
